package test;
import java.io.IOException;
import java.net.ServerSocket;
import javax.net.ssl.*;

public class SecureServerConnection {
	

		private SSLServerSocket serverSocket;

		
		
		public SecureServerConnection(int port) throws IOException {
			
			SSLServerSocketFactory sslserversocketfactory =
		        (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
		      SSLServerSocket serverSocket =
		        (SSLServerSocket)sslserversocketfactory.createServerSocket(port);
		      SSLSocket sslsocket = (SSLSocket)serverSocket.accept();
		     
		}

		public SecureSocketConnection accept() throws IOException {
			return new SecureSocketConnection((SSLSocket) serverSocket.accept());
		}

		public void close() throws IOException {
			serverSocket.close();
		}
		
		
	}


